package com.zanglikun.apacheCommonUtil.apacheCommonIO;

/**
 * @author : zanglikun
 * @date : 2024/9/1 下午7:05
 * @desc : Copyright © zanglikun.com
 * 文件名解析工具
 */
public class FilenameUtilsTest {
    public static void main(String[] args) {
        String filePath = "D:\\A\\B\\睡觉.txt";
        System.out.println(org.apache.commons.io.FilenameUtils.getName(filePath)); // 睡觉.txt
        System.out.println(org.apache.commons.io.FilenameUtils.getBaseName(filePath)); // 睡觉
        System.out.println(org.apache.commons.io.FilenameUtils.getExtension(filePath)); // txt
    }
}
